1. Field of the Invention
This invention relates to a figure definition method for use in automatic programming and, more particularly, to a figure definition method in automatic programming for creating an NC machining program automatically from figure definition statements and motion statements created in an automatic programming language.
2. Description of the Related Art
In automatic programming for creating NC data using an automatic programming language such as APT (automatic programming tools) or FAPT,
(a) a parts program based on the automatic programming language is created by defining figure elements such as points, straight lines and circular arcs using simple symbols (this is referred to as "figure definition"), and then defining a tool path using the figure elements such as the defined points, straight lines and circular arcs (referred to as "motion statement definition"), and PA1 (b) the parts program based on the automatic programming language is subsequently converted into an NC machining program, which comprises NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit, by using an NC data output table. PA1 (i) the coordinates of a point may be entered directly from a keyboard in the form P.sub.i =x.sub.i, y.sub.i ; PA1 (ii) the point can be defined as an intersection between two straight lines S.sub.m, S.sub.n [see FIG. 4(a)]; PA1 (iii) the point can be defined as either the left or right point of intersection of the two intersections between the straight line S.sub.m and a circle C.sub.n [see FIG. 4(b)]; PA1 (iv) the point can be defined as a point of tangency between the straight line S.sub.m and the circle C.sub.n [see FIG. 4(c)]; PA1 (v) the point can be defined as either the upper or lower point of intersection of the two intersections between two circles [see FIG. 4(d)]; or PA1 (vi) the point can be defined as a point of tangency between two circles [see FIG. 4(e)]. For example, in the cases of (ii), (iii) and (iv), if the following figure definition statements created in the automatic programming language are entered from a keyboard: ##EQU1## (where L: left; R: right), then the coordinates x.sub.i, y.sub.i of the desired intersection or point of tangency are calculated and the point definition data are stored in memory in the form EQU P.sub.i =x.sub.i, y.sub.i PA1 (i) the straight line can be defined as a straight line S.sub.i passing through one point P.sub.m and forming an angle .alpha. with a horizontal axis [See FIG. 5(a)]; PA1 (ii) the straight line can be defined as a straight line S.sub.i passing through two points P.sub.m, P.sub.n [see FIG. 5(b)]; PA1 (iii) the straight line can be defined as a straight line S.sub.i passing through the point P.sub.m and tangent to the circle C.sub.n [see FIG. 5(c)]; or PA1 (iv) the straight line can be defined as a straight line S.sub.i tangent to the two circles C.sub.m, C.sub.n [see FIG. 5(d)]. For example, in the cases of (i)-(iv), if the following figure definition statements created in the automatic programming language are entered from a keyboard: ##EQU2## (where A: above; B: below), then a distance L.sub.i from the origin (0,0) to the straight line and an angle A.sub.i which the straight line forms with a horizontal line are calculated and the straight-line definition data are stored in memory in the form EQU S.sub.i =L.sub.i, A.sub.i PA1 (i) the circular arc can be defined as a circle C.sub.i center P.sub.m and radius r [See FIG. 6(a)]; PA1 (ii) the circular arc can be defined as a circle C.sub.i passing through point P.sub.n and having the center P.sub.m See FIG. 6(b)]; PA1 (iii) the circular arc can be defined as a circle C.sub.i tangent to straight line S.sub.n and having the center P.sub.m See FIG. 6(c)]; PA1 (iv) the circular arc can be defined as a circle C.sub.i tangent to circle C.sub.n and having the center P.sub.m [See FIG. 6(d)]; PA1 (v) the circular arc can be defined as a circle C.sub.i tangent to straight line S.sub.n and having radius r and center P.sub.m [See FIG. 6(e)]; PA1 (vi) the circular arc can be defined as a circle C.sub.i of radius r tangent to the two straight lines S.sub.m, S.sub.n [See FIG. 6(f)]; or PA1 (vi) the circular arc can be defined as a circle C.sub.i passing through three points P.sub.m, P.sub.n, P.sub.s [See FIG. 6(g)]. For example, in the cases of (i), (ii) and (iii), if the following figure definition statements created in the automatic programming language are entered from a keyboard: ##EQU3## then the coordinates x.sub.m, y.sub.m of the center of the center and the radius r thereof are calculated and the circle definition data are stored in memory in the form EQU C.sub.i =x.sub.m, y.sub.m, r
In figure definition, conventionally the figure elements are defined by the methods illustrated hereinbelow. Specifically, in defining a point, various methods are available, as follows:
Various methods of defining a straight line are also available, as follows:
Various methods of defining a circular arc are also available, as follows:
Thus, when a new figure element is defined using figure elements already defined, conventionally a code (the element identifier) attached to the already defined figure element must be entered from the keyboard to designate the figure element, and the figure definition statement must be created and entered in a predetermined format.
With this method, however, the operator must memorize the code (element identifier) of the already defined element and must know the grammar (the rules) of the figure definition statement. This makes figure definition troublesome and incapable of being performed in a rapid manner.
Accordingly, an object of the present invention is to provide a figure definition method in the automatic programming in which it is unnecessary to memorize the codes of figure elements (also termed "previously defined figure element definition statements" or "defined figure element definition statements"), and in which figure elements used in defining new figure elements can be confirmed visually through a simple method.